package com.company;

import java.math.BigDecimal;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	// write your code here
       // double a=new Scanner(System.in).nextDouble();
      //  double b=new Scanner(System.in).nextDouble();
      //  System.out.println(a+b);
        // System.out.println(a-b);
        // System.out.println(a*b);
        //  System.out.println(a/b);

        method();
    }
    public static void method(){

        double a=new Scanner(System.in).nextDouble();
         double b=new Scanner(System.in).nextDouble();
        BigDecimal bd1=new BigDecimal(a+"");
        BigDecimal bd2=new BigDecimal(String.valueOf(b));

       // System.out.println(a+b);
        BigDecimal bd3=bd1.add(bd2);
        BigDecimal bd4=bd1.subtract(bd2);
        BigDecimal bd5=bd1.multiply(bd2);
        BigDecimal bd6=bd1.divide(bd2,5,BigDecimal.ROUND_HALF_DOWN);

        System.out.println(bd3);
        System.out.println(bd4);
        System.out.println(bd5);
        System.out.println(bd6);


    }
}
